using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.H_BankTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_BankTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_BankTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_Bank";
			dataTableMapping.ColumnMappings.Add("BankID", "BankID");
			dataTableMapping.ColumnMappings.Add("BankTargetName", "BankTargetName");
			dataTableMapping.ColumnMappings.Add("Charge", "Charge");
			dataTableMapping.ColumnMappings.Add("ExchangeRate", "ExchangeRate");
			dataTableMapping.ColumnMappings.Add("BankAccess", "BankAccess");
			dataTableMapping.ColumnMappings.Add("EnableBank", "EnableBank");
			dataTableMapping.ColumnMappings.Add("TransferField", "TransferField");
			dataTableMapping.ColumnMappings.Add("DBType", "DBType");
			dataTableMapping.ColumnMappings.Add("AccessPath", "AccessPath");
			dataTableMapping.ColumnMappings.Add("Sql_User", "Sql_User");
			dataTableMapping.ColumnMappings.Add("Sql_Pass", "Sql_Pass");
			dataTableMapping.ColumnMappings.Add("Sql_Source", "Sql_Source");
			dataTableMapping.ColumnMappings.Add("TableName", "TableName");
			dataTableMapping.ColumnMappings.Add("InterfaceID", "InterfaceID");
			dataTableMapping.ColumnMappings.Add("BankFrontName", "BankFrontName");
			dataTableMapping.ColumnMappings.Add("Sql_Dbname", "Sql_Dbname");
			dataTableMapping.ColumnMappings.Add("TableUserName", "TableUserName");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HL_Bank] WHERE (([BankID] = @Original_BankID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_BankID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HL_Bank] ([BankTargetName], [Charge], [ExchangeRate], [BankAccess], [EnableBank], [TransferField], [DBType], [AccessPath], [Sql_User], [Sql_Pass], [Sql_Source], [TableName], [InterfaceID], [BankFrontName], [Sql_Dbname], [TableUserName]) VALUES (@BankTargetName, @Charge, @ExchangeRate, @BankAccess, @EnableBank, @TransferField, @DBType, @AccessPath, @Sql_User, @Sql_Pass, @Sql_Source, @TableName, @InterfaceID, @BankFrontName, @Sql_Dbname, @TableUserName)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BankTargetName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "BankTargetName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Charge", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ExchangeRate", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ExchangeRate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BankAccess", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "BankAccess", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@EnableBank", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "EnableBank", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TransferField", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "TransferField", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DBType", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "DBType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@AccessPath", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "AccessPath", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Sql_User", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_User", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Sql_Pass", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_Pass", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Sql_Source", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_Source", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TableName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "TableName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@InterfaceID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "InterfaceID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BankFrontName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "BankFrontName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Sql_Dbname", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_Dbname", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TableUserName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "TableUserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HL_Bank] SET [BankTargetName] = @BankTargetName, [Charge] = @Charge, [ExchangeRate] = @ExchangeRate, [BankAccess] = @BankAccess, [EnableBank] = @EnableBank, [TransferField] = @TransferField, [DBType] = @DBType, [AccessPath] = @AccessPath, [Sql_User] = @Sql_User, [Sql_Pass] = @Sql_Pass, [Sql_Source] = @Sql_Source, [TableName] = @TableName, [InterfaceID] = @InterfaceID, [BankFrontName] = @BankFrontName, [Sql_Dbname] = @Sql_Dbname, [TableUserName] = @TableUserName WHERE (([BankID] = @Original_BankID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BankTargetName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "BankTargetName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Charge", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ExchangeRate", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ExchangeRate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BankAccess", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "BankAccess", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@EnableBank", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "EnableBank", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TransferField", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "TransferField", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DBType", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "DBType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@AccessPath", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "AccessPath", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Sql_User", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_User", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Sql_Pass", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_Pass", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Sql_Source", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_Source", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TableName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "TableName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@InterfaceID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "InterfaceID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BankFrontName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "BankFrontName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Sql_Dbname", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Sql_Dbname", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TableUserName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "TableUserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_BankID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[5];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT BankID, BankTargetName, Charge, ExchangeRate, BankAccess, EnableBank, \r\n      TransferField, DBType, AccessPath, Sql_User, Sql_Pass, Sql_Source, TableName, \r\n      InterfaceID, BankFrontName, Sql_Dbname, TableUserName\r\nFROM HL_Bank";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "DELETE FROM HL_Bank \r\nWHERE\r\nBankID=@BankID";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@BankID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT AccessPath, BankAccess, BankFrontName, BankID, BankTargetName, Charge, DBType, EnableBank, ExchangeRate, InterfaceID, Sql_Dbname, Sql_Pass, Sql_Source, Sql_User, TableName, TableUserName, TransferField FROM HL_Bank WHERE (BankID = @BankID)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@BankID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "INSERT INTO HL_Banke (BankTargetName,Charege,ExchangeRate,BankAccess,EnableBank)\r\nVALUES (@BankTargetName,@Charege,@ExchangeRate,@BankAccess,@EnableBank)\r\n";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@BankTargetName", SqlDbType.Variant, 1024, ParameterDirection.Input, 0, 0, "BankTargetName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@Charege", SqlDbType.Variant, 1024, ParameterDirection.Input, 0, 0, "Charege", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@ExchangeRate", SqlDbType.Variant, 1024, ParameterDirection.Input, 0, 0, "ExchangeRate", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@BankAccess", SqlDbType.Variant, 1024, ParameterDirection.Input, 0, 0, "BankAccess", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@EnableBank", SqlDbType.Variant, 1024, ParameterDirection.Input, 0, 0, "EnableBank", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "UPDATE HL_Bank Set BankTargetName=@BankTargetName,Charge=@Charge,ExchangeRate=@ExchangeRate,BankAccess=@BankAccess,EnableBank=@EnableBank\r\nWhere BankID=@BankID";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@BankTargetName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, "BankTargetName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@Charge", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@ExchangeRate", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ExchangeRate", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@BankAccess", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "BankAccess", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@EnableBank", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "EnableBank", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@BankID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "BankID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Bank.HL_BankDataTable GetBanks()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			H_Bank.HL_BankDataTable hL_BankDataTable = new H_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Bank.HL_BankDataTable GetBankdByBankID(int BankID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			this.Adapter.SelectCommand.Parameters[0].Value = BankID;
			H_Bank.HL_BankDataTable hL_BankDataTable = new H_Bank.HL_BankDataTable();
			this.Adapter.Fill(hL_BankDataTable);
			return hL_BankDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Bank.HL_BankDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Bank dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_Bank");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteBank(int BankID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			sqlCommand.Parameters[0].Value = BankID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int InsertBank(object BankTargetName, object Charege, object ExchangeRate, object BankAccess, object EnableBank)
		{
			SqlCommand sqlCommand = this.CommandCollection[3];
			if (BankTargetName == null)
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = BankTargetName;
			}
			if (Charege == null)
			{
				throw new System.ArgumentNullException("Charege");
			}
			sqlCommand.Parameters[1].Value = Charege;
			if (ExchangeRate == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = ExchangeRate;
			}
			if (BankAccess == null)
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = BankAccess;
			}
			if (EnableBank == null)
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = EnableBank;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateBank(string BankTargetName, int? Charge, int? ExchangeRate, int? BankAccess, int? EnableBank, int BankID)
		{
			SqlCommand sqlCommand = this.CommandCollection[4];
			if (BankTargetName == null)
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = BankTargetName;
			}
			if (Charge.HasValue)
			{
				sqlCommand.Parameters[1].Value = Charge.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (ExchangeRate.HasValue)
			{
				sqlCommand.Parameters[2].Value = ExchangeRate.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (BankAccess.HasValue)
			{
				sqlCommand.Parameters[3].Value = BankAccess.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (EnableBank.HasValue)
			{
				sqlCommand.Parameters[4].Value = EnableBank.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			sqlCommand.Parameters[5].Value = BankID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
